package is.web;

/**
 *
 * @author aspr0
 */
public class Checker
{
    public static boolean isPositiveInteger(Object o)
    {
        int i;

        try
        {
            i = Integer.parseInt(o.toString());
        }
        catch (Exception e)
        {
            return false;
        }

        if (i > 0)
        {
            return true;
        }
        else
        {
            return false;
        }
    }

    public static boolean isZeroPositiveInteger(Object o)
    {
        int i;

        try
        {
            i = Integer.parseInt(o.toString());
        }
        catch (Exception e)
        {
            return false;
        }

        if (i >= 0)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
}
